<?php
/**
 * Created by Command.
 * User: Vito
 */

namespace app\admin\curd\water_ele_price;

use app\common\curd\Update;
use app\model\WaterElePrice;
use app\exception\MessageException;
class WaterElePriceUpdate extends Update
{
    //验证器
    protected $validate = [];
    //允许新增的数据字段
    protected $field = [];
    //获取对象时追加的字段
    protected $appendField = [];
    //排除的数据
    protected $exclude = [];
    //条件
    protected $where = [];

    // protected function saveMiddleware($next,  $model,  $params)
    // {
        
    //     $where[] = ['type','=', $params['type']];
    //     $where[] = ['bottom','>',$params['bottom']];
    //     $res = WaterElePrice::where($where)->find();
    //     if($res){
    //         throw new MessageException('收费区间的谷值已存在');
    //     }

    //     return $next($model, $params);
    // }
}